<?php
$oFiles = JobHandler::getFiles($_SESSION['iJobID']);
$sImageDir = $_SESSION['oUserVars']['images'];
?>
<div class="hidden" id="layer_job_files" style="visibility: visible;">
<table class="boxborder" cellspacing="0">
	<tr>
		<td class="boxhandle" colspan="3"><?php print msg('Files') ?></td>
	</tr>
	<tr>
		<td style="width: 1px;" class="listtop center small">
			<a href="javascript: showBox('job-fileadd'); layerHide('layer_job_files');"><img src="images/<?php print $sImageDir ?>/file-add.png" border="0"></a>
		</td>
		<td class="listtop"><?php print msg('File') ?></td>
		<td class="listtop"><?php print msg('Description') ?></td>
	</tr>
<?php
foreach ($oFiles as $oThisFile)
{
	?>
	<tr>
		<td class="listentity" style="width: 1px;" nowrap>
			<a href="javascript: showBox('job-filedelete', 'iFile=<?php print $oThisFile->iID ?>'); layerHide('layer_job_files');"><img src="images/<?php print $sImageDir ?>/file-delete.png" border="0"></a>
			<a href="javascript: showBox('job-filechange', 'iFile=<?php print $oThisFile->iID ?>'); layerHide('layer_job_files');"><img src="images/<?php print $sImageDir ?>/file-change.png" border="0"></a>
		</td>
		<td class="listentity"><a href="index.php?sAction=job-filedownload&sFile=<?php print urlencode($oThisFile->sFilename) ?>"><?php print $oThisFile->sFilename ?></a></td>
		<td class="listentity"><?php print $oThisFile->sDescription ?>&nbsp;</td>
	</tr>
	<?php
}
?>
	<tr>
		<td class="boxbody center" colspan="3">
			<input type="button" value="<?php print msg('Close') ?>" onClick="layerHide('layer_job_files');">
		</td>
	</tr>
</table>
</div>
